package edu.nf.ch11.pool;

import java.sql.Connection;

/**
 * @author wangl
 * @date 2025/4/18
 */
public class Main {

    public static void main(String[] args) throws Exception {
        ConnectionPool pool = new ConnectionPool(5);
        System.out.println("初始化大小：" + pool.size());
        //此时返回的连接是一个代理对象
        Connection conn = pool.getConnection();
        System.out.println("获取连接后：" + pool.size());
        conn.close();
        System.out.println("关闭连接后：" + pool.size());
    }
}